import BuffUtil from '@/BuffUtil';
import UnitSpellEvent from '@/event/UnitSpellEvent';
import SelectCommon from 'code/Core/Common/SelectCommon';
export default class Item_勇气勋章 {
    static id = 'Ayqx';
    static 名称: string = '勇气勋章';
    static 描述: string = '提升生命回复速度';
    static 图标: string = 'ReplaceableTextures\\CommandButtons\\BTNMedalionOfCourage.blp';
    static buffId: string = 'buff_item_yqxz';
    static buffType: AppBuffType = {
        id: 'buff_item_yqxz',
        name: Item_勇气勋章.名称,
        ubertip: Item_勇气勋章.描述,
        art: Item_勇气勋章.图标,
        attribute: {
            生命恢复: 50,
        },
        dur: 20,
        targetAttach: 'origin',
        targetArt: 'Abilities\\Spells\\Human\\InnerFire\\InnerFireTarget.mdl',
    };
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {
        let us = SelectCommon.getAllyUnitInRange(来源, 800);
        for (let u of us) {
            BuffUtil.addBuff(u, Item_勇气勋章.buffId, 来源);
        }
    }
    constructor() {
        BuffUtil.registerBuffType(Item_勇气勋章.buffType);
        se.onUnitSpellEffect(Item_勇气勋章.spellEffect, Item_勇气勋章.id);
    }
    static spellEffect(this: void, d: UnitSpellEvent) {
        Item_勇气勋章.释放(d.spellTargetX, d.spellTargetY, d.trigUnit, d.spellTargetUnit, d);
    }
}
